<h2>DESCRIPTION</h2>

<em>i.topo.corr</em> is used to topographically correct reflectance
from imagery files, e.g. obtained with <em>i.landsat.toar</em>, using a
sun illumination terrain model. This illumination model represents the
cosine of the incident angle <em>i</em>, i.e. the  angle between the normal to the
ground and the sun rays.
<p>
Note: If needed, the sun position can be calculated for a given date with
<em>r.sunmask</em>.


<center>
<img src="i_topo_corr_angles.png" alt="Figure showing terrain and solar angles"><br>
Figure showing terrain and solar angles
</center>

<p>
Using the <b>-i</b> flag and given an elevation basemap (metric),
<em>i.topo.corr</em> creates a simple illumination model using the formula:
<ul>
  <li> cos_i = cos(s) * cos(z) + sin(s) * sin(z) * cos(a - o) </li>
</ul>
where,
<em>i</em> is the incident angle to be calculated,
<em>s</em> is the terrain slope angle,
<em>z</em> is the solar zenith angle,
<em>a</em> the solar azimuth angle,
<em>o</em> the terrain aspect angle.

<p>
For each band file, the corrected reflectance (ref_c) is calculate from
the original reflectance (ref_o) using one of the four offered methods
<!-- TODO: fix next numbers -->
(one lambertian and two non-lambertian).</p>

<h3>Method: cosine</h3>

<ul>
  <li> ref_c = ref_o * cos_z / cos_i </li>
</ul>

<h3>Method: minnaert</h3>

<ul>
  <li>ref_c = ref_o * (cos_z / cos_i) ^k</li>
</ul>
where,
<em>k</em> is obtained by linear regression of<br>
ln(ref_o) = ln(ref_c) - k ln(cos_i/cos_z)

<h3>Method: c-factor</h3>

<ul>
  <li>ref_c = ref_o * (cos_z + c)/ (cos_i + c)</li>
</ul>
where,
<em>c</em> is a/m from ref_o = a + m * cos_i

<h3>Method: percent</h3>

We can use cos_i to estimate the percent of solar incidence on the surface,
then the transformation (cos_i + 1)/2 varied from 0
(surface in the side in opposition to the sun: infinite correction) to 1
(direct exhibition to the sun: no correction) and the corrected reflectance can
be calculated as
<ul>
  <li>ref_c = ref_o * 2 / (cos_i + 1)</li>
</ul>


<h2>NOTES</h2>

<ol>
<li>The illumination model (cos_i) with flag -i uses the actual region
    as limits and the resolution of the elevation map.</li>
<li>The topographic correction use the full reflectance file (null remain
    null) and its resolution.</li>
<li>The elevation map to calculate the illumination model should be metric.</li>
</ol>


<h2>EXAMPLES</h2>

First, make a illumination model from the elevation map (here, SRTM). Then
make perform the topographic correction of e.g. the bands toar.5, toar.4 and toar.3
with output as tcor.toar.5, tcor.toar.4, and tcor.toar.3 using c-factor (= c-correction)
method:
<p>

<div class="code"><pre>
# first pass: create illumination model
i.topo.corr -i base=SRTM zenith=33.3631 azimuth=59.8897 output=SRTM.illumination

# second pass: apply illumination model
i.topo.corr base=SRTM.illumination input=toar.5,toar.4,toar.3 output=tcor \ 
  zenith=33.3631 method=c-factor
</pre></div>


<h2>REFERENCES</h2>

<ul>
<li>Law K.H. and Nichol J, 2004. Topographic Correction For Differential
    Illumination Effects On Ikonos Satellite Imagery. International Archives of
    Photogrammetry Remote Sensing and Spatial Information, pp. 641-646.</li>
<li>Meyer, P. and Itten, K.I. and Kellenberger, KJ and Sandmeier, S. and
    Sandmeier, R., 1993. Radiometric corrections of topographically induced
    effects on Landsat TM data in alpine terrain. Photogrammetric Engineering
    and Remote Sensing 48(17).</li>
<li>Ria&ntilde;o, D. and Chuvieco, E. and Salas, J. and Aguado, I., 2003.
    Assessment of Different Topographic Corrections in Landsat-TM
    Data for Mapping Vegetation Types. IEEE Transactions On Geoscience
    And Remote Sensing, Vol. 41, No. 5</li>
<li>Twele A. and Erasmi S, 2005. Evaluating topographic correction algorithms
    for improved land cover discrimination in mountainous areas of
    Central Sulawesi. G&ouml;ttinger Geographische Abhandlungen, vol. 113.</li>
</ul>


<h2>SEE ALSO</h2>

<em>
<a href="i.landsat.toar.html">i.landsat.toar</a>,
<a href="r.mapcalc.html">r.mapcalc</a>,
<a href="r.sun.html">r.sun</a>
<a href="r.sunmask.html">r.sunmask</a>
</em>

<h2>AUTHOR</h2>

E. Jorge Tizado  (ej.tizado unileon es)<br>
Dept. Biodiversity and Environmental Management, University of Le&oacute;n, Spain
<p>
Figure derived from Neteler &amp; Mitasova, 2008.

<!--
<p>
<i>Last changed: $Date$</i>
-->
